package com.ashley.thread.test4;

/**
 * @author ashley
 * @date 2019/9/27-15:03
 */
public class MyThread2 extends Thread {
    private int count = 5;
    public MyThread2(String name){
        super();
        this.setName(name);
    }

    @Override
    public void run() {
        super.run();
        while(count>0){
            count--;
            System.out.println("由线程" + this.currentThread().getName()+"计算, count=" + count);
        }
    }
}
